﻿using System;
using System.Globalization;

namespace Finance.TodoSoft
{
	public static class DecimalExtension
	{
		public static decimal ParseCurrency(string strDecimal)
		{
			strDecimal = strDecimal
					.Replace(".", CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator)
					.Replace(",", CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator);

			return Decimal.Parse(strDecimal, NumberStyles.Currency);
		}
	}
}
